package com.wx.fresh.business.controller;

import com.wx.fresh.business.vo.activityVo.BusinessActivityAddVo;
import com.wx.fresh.business.vo.activityVo.BusinessActivityDeleteVo;
import com.wx.fresh.business.vo.activityVo.BusinessActivityVo;
import com.wx.fresh.common.util.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "B活动")
@RestController
@RequestMapping("/businessActivity")
public class ActivityController {


    @ApiOperation(value = "B端活动", response = BusinessActivityVo.class)
    @GetMapping("/findAll")
    public Object findAll(BusinessActivityVo businessVo) {
        return CommonResult.success();
    }

    @ApiOperation(value = "取消活动", response = BusinessActivityDeleteVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "activity_id", value = "活动id", required = true, paramType = "form")
    })
    @DeleteMapping("/delete")
    public Object delete(BusinessActivityDeleteVo businessActivityDeleteVo) {
        return CommonResult.success();
    }

    @ApiOperation(value = "新增活动", response = BusinessActivityAddVo.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "activity_id", value = "活动id", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activity_type", value = "活动类型", required = true, paramType = "form"),
            @ApiImplicitParam(name = "executive_standards", value = "活动门槛", required = true, paramType = "form"),
            @ApiImplicitParam(name = "store_id", value = "参与门店id", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activityName", value = "活动名称", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activityContent", value = "活动内容", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activityImage", value = "活动海报", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activityStartTime", value = "活动开始时间", required = true, paramType = "form"),
            @ApiImplicitParam(name = "activityEndTime", value = "活动结束时间", required = true, paramType = "form"),
    })
    @PostMapping("/add")
    public Object add(BusinessActivityAddVo businessVo) {
        return CommonResult.success();
    }

    @ApiOperation(value = "查询活动Id", response = BusinessActivityVo.class)
    @GetMapping("/findById")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "activity_id", value = "活动id", required = true, paramType = "form")
    })
    public Object findById(BusinessActivityVo businessVo) {
        return CommonResult.success();
    }

}
